<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>邀请好友</title>
		<link rel="stylesheet" href="../../css/mycommon.css">
		<link rel="stylesheet" href="../../mui/css/mui.min.css">
		<link rel="stylesheet" href="../../mui/css/mui.picker.min.css">
		<!-- 拓展muiLoading -->
		<link rel="stylesheet" href="./muiload.css">
		<script src="../../js/vue.min.js"></script>
		<script src="../../mui/js/mui.min.js"></script>
		<script src="../../js/jquery/jquery.min.js"></script>
		<script src="../../js/commit.js"></script>
		<!-- 插件 -->
		<script src="../../mui/js/mui.picker.js"></script>
		<script src="../../mui/js/mui.poppicker.js"></script>
		<!-- 拓展muiLoading -->
		<script src="./muiload.js"></script>
		<style>
			::-webkit-input-placeholder {
				/* WebKit browsers */
				color: #C1C1C1;
			}
			
			 :-moz-placeholder {
				/* Mozilla Firefox 4 to 18 */
				color: #C1C1C1;
			}
			
			 ::-moz-placeholder {
				/* Mozilla Firefox 19+ */
				color: #C1C1C1;
			}
			
			 :-ms-input-placeholder {
				/* Internet Explorer 10+ */
				color: #C1C1C1;
			}
			
			.titleImg img {
				width: 100%;
				height: auto;
			}
			
			.registerBox {
				width: 90%;
				background: #fff;
				margin: auto;
				left: 0;
				right: 0;
				bottom: 10px;
			}
			
			input {
				font-size: 14px !important;
				margin-bottom: 0 !important;
				border: none !important;
				background: #EFF3F6 !important;
				width: 100%;
				padding: 12px 16px;
				box-sizing: border-box;
			}
			
			.border-d5 {
				border-radius: 5px;
			}
		</style>
	</head>

	<body>
		<div id="app">
  			<input id="myFile1" type="file" name="file" style="margin-top:20px;">
  			<img src="" id="preview_img" width="400px" height="400px" alt="">
		</div>
		<script>
			$("#myFile1").change(function () {
		        //创建blob对象，浏览器将文件放入内存中，并生成标识
		        var img_src = URL.createObjectURL($(this)[0].files[0]);
		        //给img标检的src赋值
		        document.getElementById("preview_img").src=img_src;
		        //URL.revokeObjectURL(img_src);// 手动 回收，
   			 });
			function upload(obj){
				var files = obj.files ;
				var formData = new FormData();
				    for(var i = 0;i<files.length;i++){                
				        formData.append("upfile[]", files[i]);
				        
				    }
				    console.log("获取的文件",formData)
//				    $.ajax({
//				          url: "1.php",
//				          type: "POST",
//				          data:formData,
//				          cache:false,         //不设置缓存
//				          processData: false,  // 不处理数据
//				          contentType: false   // 不设置内容类型
//				    });    
				}
		</script>
		<!--插件-->
		<script src="https://cdn.bootcss.com/eruda/1.4.4/eruda.min.js"></script>
		<script>
				eruda.init();
		</script>
	</body>

</html>